// FileFindEx.h: interface for the CFileFindEx class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FILEFINDEX_H__6E27C3FA_DA76_4630_9C14_42235D8CF7F0__INCLUDED_)
#define AFX_FILEFINDEX_H__6E27C3FA_DA76_4630_9C14_42235D8CF7F0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class DllExport CFileFindEx  
{
public:
	enum FindType
	{
		DIRECTORY_NAME = 0,
		FILE_NAME = 1,
		ALL = 2
	};

public:
	CFileFindEx();
	CFileFindEx(const CString& strFilePath);
	virtual ~CFileFindEx();

public:
	int FindNextFileEx();
	CString GetCurFileName();
	int FindFileEx(const CString& strFileName, FindType flag=FILE_NAME);
	void SetFilePath(const CString & strFilePath);

private:
	bool IsDirectoryEx(const CString &strName);

private:
	FindType m_flag;
	CFileFind m_find;
	INT m_nFileFindStatus;
	CString m_strFilePath;
};

#endif // !defined(AFX_FILEFINDEX_H__6E27C3FA_DA76_4630_9C14_42235D8CF7F0__INCLUDED_)
